<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LinksManage.aspx.cs" Inherits="admin_Links_LinksManage" %>
<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>友情链接管理</title>
<link rel="stylesheet" href="../skin/style.css" type="text/css" />
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript" src="../../js/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="itemtitle">
            <h3>
                友情链接搜索</h3>
        </div>
        <div class="itemtitle_tect">
            <p>
                
                
                网站名称：
                  <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                <asp:DropDownList ID="dropLinkType" runat="server">
                  <asp:ListItem Value="1">Logo链接</asp:ListItem>
                  <asp:ListItem Value="2">文字链接</asp:ListItem>
                  <asp:ListItem Value="3" Selected="True">所有友情连接</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="btnSelect" runat="server" OnClick="btnSelect_Click" Text="查询" CssClass="i_button" /></p>
      </div>
        <div class="clr"></div>
		<div class="partition">
  <div class="Option">
                <asp:Label ID="Label5" runat="server"><strong>快捷操作</strong></asp:Label>
                <asp:Label ID="Label1" runat="server"><a href="?v=1">图片链接</a></asp:Label>
				<asp:Label ID="Label2" runat="server"><a href="?v=2">文字链接</a></asp:Label>
   </div>
        </div>
		<div class="clr"></div>
        <div class="talbe_border">
            <asp:GridView ID="grdLinks" runat="server" AutoGenerateColumns="False" CellPadding="0"
                GridLines="None" AllowPaging="False" DataKeyNames="ID" OnPageIndexChanging="grdLinks_PageIndexChanging"
                OnRowDeleting="grdLinks_RowDeleting" OnRowDataBound="grdLinks_RowDataBound" CssClass="talbe_list">
                <Columns>
                    <asp:TemplateField HeaderText="网站名称">
                        <ItemTemplate>
                            <a href='<%# Eval("WebURL") %>' target="_blank" style="text-decoration: none">
                                <%# Eval("WebName") %>
                            </a>
                        </ItemTemplate>
                        <ItemStyle CssClass="left2" />
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="网站Logo">
                        <ItemTemplate>
                            <asp:Label ID="lblimg" runat="server">
                                <a href='<%# Eval("WebURL") %>' target="_blank">
                                       <img id="Image1" width="88" height="31" src='<%# Base.Common.ProcessAbsoluteUrl(Eval("WebLOGO").ToString()) %>' alt="" /> </a>
                            </asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="网站简介">
                        <ItemTemplate>
                            <%# Eval("WebIntro").ToString().Length <= 15 ? Eval("WebIntro").ToString() : Eval("WebIntro").ToString().Substring(0,15)+"..." %>
                        </ItemTemplate>
                        <ItemStyle CssClass="left2" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="WebAdmin" HeaderText="站长" />
                    <asp:TemplateField HeaderText="链接类型">
                        <ItemTemplate>
                            <%# Eval("LinkType").ToString()=="1" ? "图片链接":"文字链接" %>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="审核">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnUpdate" Font-Underline="false" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")+"|"+DataBinder.Eval(Container.DataItem, "Verify") %>'
                                Text='<%# DataBinder.Eval(Container.DataItem, "Verify").ToString()== "True" ? "已审核" : "未审核"%>'
                                OnCommand="lbtnUpdate_Command"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th30" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作选项">
                        <ItemTemplate>
                            <a href='LinksEdit.aspx?ID=<%# Eval("id") %>' style="text-decoration: none">编辑 </a> | 
                            <asp:LinkButton ID="lbtnDelete" Style="text-decoration: none" runat="server" Text="删除"
                                OnClientClick="return confirm('你确定要删除吗?')" CommandName="delete"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
            </asp:GridView>
            <asp:Label ID="lblMessage" runat="server" ForeColor="red" Visible="false"></asp:Label>
			<div class="Paging">
			 <p>
                 <uc1:PageNo ID="PageNo1" runat="server" />
		  </p>
		  </div>
        </div>
    </form>
</body>
</html>
